/*
    Contact info:
    bhepple@freeshell.org
    http://bhepple.freeshell.org/scrmgr

    Copyright (C) 1991-2008 Bob Hepple

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; see the file COPYING.  If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.

*/
/*

Screen Manager IO - low level calls to the underlying terminal control
software, presently terminfo, but potentially any similar discipline.

Functions:

smio initialisation
smio suspension (e.g. shell escape)
smio resumption
smio termination
pop up window
close window
clear screen
enquire screen parameters
goto screen location
enquire screen position
set display enhancement
paint characters
input keystroke
ring bell
refresh screen

*/

#ifndef SMIO
#define SMIO

/* SECTION 1 - FUNCTION PROTOTYPES */

#ifdef SM_XVIEW
extern	int	smio_using_xview;
#endif
#ifdef SM_XAW
extern	int	smio_using_xaw;
#endif
extern	int	smio_using_curses;

void		smio_init 	HARG3(int, 	doit,
				      int,	argc,
				      CHAR **,	argv);

void		smio_abort	HARG1(CHAR *, 	msg);

void		smio_susp 	NOARGS;

void		smio_res 	NOARGS;

void		smio_term 	NOARGS;

int 		smio_system 	HARG2(CHAR *, 	buf, 
				      int, 	flag);

int		smio_popup 	HARG4(int, 	num_rows,
				      int, 	num_cols,
				      int, 	row,
				      int, 	col);

void		smio_delwin 	HARG1(int,	window);

void		smio_clear 	HARG1(int,	window);

void		smio_clrline 	HARG1(int,	window);

void		smio_getyx 	HARG3(int,	window,
				      int *, 	row,
				      int *, 	col);

void		smio_enq 	HARG3(int,	window,
				      int *, 	row,
				      int * 	,col);

void		smio_enq_screen HARG2(int *, 	row,
				      int *, 	col);

void		smio_goto 	HARG3(int,	window,
				      int, 	row,
				      int, 	col);

void		smio_enh 	HARG2(int,	window,
				      ENH, 	enhancement);

void		smio_puts 	HARG2(int,	window,
				      CHAR *, 	s);

int		smio_getch 	NOARGS;

void 		smio_push_command
				HARG1(int, 	command);

int		smio_enq_mouse 	HARG3(int *, 	row,
				      int *, 	col,
				      int *, 	time_delta);

void		smio_add_callback HARG2(f_ptr, 	lambda,
					void *,	object);

int 		smio_destroy_callback NOARGS;

void		smio_init_callback NOARGS;
				
void		smio_main_loop	NOARGS;
					
void		smio_bell 	NOARGS;

void		smio_refresh 	NOARGS;

void		smio_null_skey	NOARGS;

void 		smio_paint_skey HARG1(SM_SOFTKEY, 	softkey_set);

void 		smio_paint_menu HARG1(SM_MENU, 		menu);

void 		smio_get_argument HARG1(CHAR *, buf);

void		smio_message 	HARG1(CHAR *, 	s);

void		smio_flushinp 	NOARGS;

int		smio_maxcol 	HARG2(int,	window,
				      int, 	col_desired);

int		smio_insertp 	NOARGS;

void 		smio_null_skey 	NOARGS;

int 		smio_line_error HARG3(CHAR *, 	msg, 
				      CHAR *, 	offense, 
				      int, 	line_num);

int 		smio_error 	HARG1(CHAR *,	msg);

int 		smio_confirm 	HARG1(CHAR *, 	msg);

#endif		/* SMIO */


/* For emacs:
 * Local Variables:
 * tab-width: 8
 * End:
 */
